import time


def pprint(content, flush=False, end='\r\n'):
    print(' '*40, end='\r')
    print(content, flush=flush, end=end)


def exec_time(func):
    """
    执行时间
    """
    def wrapper(*args, **kwargs):
        start_time = time.time()
        func(*args, **kwargs)
        end_time = time.time()
        pprint(f'用时{format(end_time-start_time, ".1f")}s')
    return wrapper
